﻿var ZyOfficePdfCommand = function()
{
	//create our own command, we dont want to use the FCKDialogCommand because it uses the default fck layout and not our own
};
ZyOfficePdfCommand.GetState = function()
{
	return FCK_TRISTATE_OFF; //we dont want the button to be toggled
};
ZyOfficePdfCommand.Execute = function()
{
    parent.window.zyOffice.getInstance().api.openPdf();
};

// 注册相关的命令.
FCKCommands.RegisterCommand('zyofficepdf', ZyOfficePdfCommand);

// 创建 "zyOffice" 工具栏按钮.
var plugin = new FCKToolbarButton('zyofficepdf', FCKLang.ZyOfficePdf);
plugin.IconPath = FCKConfig.PluginsPath + 'zyofficepdf/pdf.png';

FCKToolbarItems.RegisterItem('zyofficepdf', plugin); // 'zyOffice' is the name used in the Toolbar config.